package com.zcsy.commons.sms.dlife;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.zcsy.commons.util.PropertiesLoader;


/**  
 * @Project: common
 * @Title: DlifeSmsConfig.java
 * @Package com.zcsy.commons.sms.dlife
 * @Description: 短信网关配置
 *
 * @author xiangjw 303310059@qq.com
 * @date 2016年5月30日 下午1:35:06
 * @Copyright: 2016 武汉恒数利通软件有限公司 All rights reserved.
 * @version V1.0  
 */
public class DlifeSmsConfig {   
	public static String SMS_PREFIX = "";  //发短信的前缀
	public static String SMS_URL = "";  //短信网关地址
	public static String SMS_USERID = "";  //短信网关用户ID
	public static String SMS_ACCOUNT = "";   //短信网关用户账号
	public static String SMS_PWD = "";  //短信网关密码
	
	public static String SMS_RESEND_TIME = "";   //短信验证码重发间隔时间，单位：秒
	public static String SMS_EXPIRE_TIME = "";  //短信验证码有效时间，单位：分
	
	static Log log = LogFactory.getLog(DlifeSmsConfig.class);

	/** 
	 * @Title: load 
	 * @Description: 加载配置
	 * @param      
	 * @return void     
	 * @throws 
	 */
	static {
		log.info("oss配置加载开始  ....");
		try {
			PropertiesLoader prop = new PropertiesLoader("config.properties");
			SMS_PREFIX = prop.getProperty("sms_prefix");
			SMS_URL = prop.getProperty("sms_url");
			SMS_USERID = prop.getProperty("sms_userid");
			SMS_ACCOUNT = prop.getProperty("sms_account");
			SMS_PWD = prop.getProperty("sms_pwd");
			SMS_RESEND_TIME = prop.getProperty("sms_resend_time");
			SMS_EXPIRE_TIME = prop.getProperty("sms_expire_time");
		} catch (Exception e) {
			log.error("sms配置加载失败");
		}
	}

	public static String getSMS_PREFIX() {
		return SMS_PREFIX;
	}

	public static String getSMS_URL() {
		return SMS_URL;
	}

	public static String getSMS_USERID() {
		return SMS_USERID;
	}

	public static String getSMS_ACCOUNT() {
		return SMS_ACCOUNT;
	}

	public static String getSMS_PWD() {
		return SMS_PWD;
	}

	public static String getSMS_RESEND_TIME() {
		return SMS_RESEND_TIME;
	}

	public static String getSMS_EXPIRE_TIME() {
		return SMS_EXPIRE_TIME;
	}
		
		
}

